//
//  MallSetingCell.m
//  LvXi_newVersion
//
//  Created by 王敏 on 16/8/24.
//  Copyright © 2016年 SJT. All rights reserved.
//

#import "MallSetingCell.h"

@interface MallSetingCell()
@property(nonatomic,strong)UIView * underLine;


@end

@implementation MallSetingCell
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]){
        
        self.cellHeight = 44;
        self.backgroundColor = [UIColor clearColor];
        self.contentView.backgroundColor = [UIColor clearColor];
        UIImageView * backgroungImageView= [[UIImageView alloc] initWithFrame:CGRectMake(10, 0, ScreenSize.width-20, self.cellHeight)];
        self.backgroungImageView = backgroungImageView;
        [self.contentView insertSubview:backgroungImageView atIndex:0];
        
        
        UIView * underLine = [[UIView alloc] initWithFrame:CGRectZero];
        underLine.backgroundColor = RGBColor(245, 245, 245);
        [self.contentView addSubview:underLine];
        self.underLine = underLine;
        self.enableUnderLine = YES;
    }
    return self;
}
-(void)layoutSubviews{
    [super layoutSubviews];
    self.underLine.x = 20;
    self.underLine.y = self.cellHeight-1;
    self.underLine.height = 1;
    self.underLine.width = ScreenWidth-40;
    
    self.textLabel.width = ScreenWidth-40;
    self.textLabel.x = 20;
}

-(void)setBackGroundImage:(UIImage *)backGroundImage{
    _backGroundImage = backGroundImage;
    self.backgroungImageView.image = backGroundImage;
}
-(void)setEnableUnderLine:(BOOL)enableUnderLine{
    _enableUnderLine = enableUnderLine;
    self.underLine.hidden = !enableUnderLine;
}


-(void)setSelected:(BOOL)selected animated:(BOOL)animated{
    
}

-(void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{
    
}


@end
